package model;

public class Manufacturer extends ModelBase
{
	private String name;
	private String adress;
	private String email;
	private String phoneNumber;
	
	
	public Manufacturer()
	{
	}
	
	public Manufacturer(String name)
	{
		setName(name);
	}
	
	public Manufacturer(String name, String adress, String email, String phoneNumber)
	{
		this(name);
		setAdress(adress);
		setEmail(email);
		setPhoneNumber(phoneNumber);
	}
	
	public void setName(String name) 
	{
		if(name == null || name.trim().isEmpty()) throw new IllegalArgumentException("Name must not be null");
		this.name = name;
	}
	
	public String getName() 
	{
		return name;
	}
	
	public void setAdress(String adress) 
	{
		if(adress == null || adress.trim().isEmpty()) throw new IllegalArgumentException("Adress must not be null");
		this.adress = adress;
	}
	
	public String getAdress() 
	{
		return adress;
	}
	
	public void setEmail(String email) 
	{
		if(email == null || email.trim().isEmpty()) throw new IllegalArgumentException("E-Mail must not be null");
		this.email = email;
	}
	
	public String getEmail() 
	{
		return email;
	}
	
	public void setPhoneNumber(String phoneNumber) 
	{
		if(phoneNumber == null || phoneNumber.trim().isEmpty()) throw new IllegalArgumentException("Phone Number must not be null");
		this.phoneNumber = phoneNumber;
	}
	
	public String getPhoneNumber() {
		return phoneNumber;
	}
	
}
